From: Peter Hurley Date: Fri, 5 Aug 2011 14:51:34 +0000 (-0400) Subject: Bluetooth: hidp: Fix memory leak of cached report descriptor X-Git-Tag: archive/raspbian/4.9.13-1+rpi1~10^2~12746^2~12^2~1^2~7 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1c97e94c0b7c56319754ee6f9ccd2e93fe1ee2b3;p=linux-4.9.git Bluetooth: hidp: Fix memory leak of cached report descriptor Free the cached HID report descriptor on thread terminate. Signed-off-by: Peter Hurley Signed-off-by: Gustavo F. Padovan --- diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 7e19a012970e..26f0d109ff41 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c @@ -764,6 +764,7 @@ static int hidp_session(void *arg) up_write(&hidp_session_sem); + kfree(session->rd_data); kfree(session); return 0; }